package com.yh.service;

import com.yh.dao.UserDao;

public class UserServiceImpl implements UserSevice {
//    private UserDao userDao=new UserDaoImpl(); 写死了

    private UserDao userDao;

    //利用Set进行动态实现值得注入
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void getUser() {
        userDao.getUser();
    }
}
